Skip to content

Conversation

zhangchiqing
Copy link
Member

@zhangchiqing zhangchiqing commented Oct 3, 2025

Work towards #7912

  • Added Key Existence checks to the db operations when saving execution results.
  • Renamed the lock IDs, see comments for motivation.
  • Combined some storage API, such as BatchInsert and BatchIndex and combined into BatchInsertAndIndexXXX

@zhangchiqing zhangchiqing changed the title [Storage] Refactor index result [Storage] Refactor index execution result Oct 3, 2025
rootCmd.AddCommand(leaders.Cmd)
rootCmd.AddCommand(epochs.RootCmd)
rootCmd.AddCommand(edbs.RootCmd)
rootCmd.AddCommand(index_er.RootCmd)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tool is no longer useful since this PR. Because now we don't allow multiple results to be stored for the same block, therefore we don't have multiple results to choose from which one to be reindexed with.

ctx.Throw(fmt.Errorf("could not acquire lock for collection indexing: %w", err))
return
}
defer lctx.Release()
Copy link
Member Author

@zhangchiqing zhangchiqing Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistake like this will happen, in order to avoid this, I will create a separate PR to replace all AcquireLock usages with storage.WithLock

@zhangchiqing zhangchiqing marked this pull request as ready for review October 9, 2025 17:04
@zhangchiqing zhangchiqing requested a review from a team as a code owner October 9, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants